package start.service.impls;

import org.springframework.stereotype.Service;
import start.mapper.CityMapper;
import start.mapper.CountyMapper;
import start.mapper.ProvinceMapper;
import start.model.City;
import start.model.County;
import start.model.Province;
import start.service.IAreaService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AreaService implements IAreaService {
	@Resource
	private ProvinceMapper pm;
	@Resource
	private CityMapper cm;
	@Resource
	private CountyMapper ym;
	
	@Override
	public List<Province> findProvinces() {
		// TODO Auto-generated method stub
		return this.pm.selectAll();
	}

	@Override
	public List<City> findCitys(String pcode) {
		// TODO Auto-generated method stub
		return this.cm.selectAll(pcode);
	}

	@Override
	public List<County> findCountrys(String ctcode) {
		// TODO Auto-generated method stub
		return this.ym.selectAll(ctcode);
	}

}
